<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>库存列表（含成本）</title>
	<include file="Public:header" />
	<style type="text/css">
		.input{width:150px;border:1px solid #ccc;padding:2px;}
	</style>
	<script type="text/javascript">
		var actflg="{:C('URL_MODEL')}"=="0"?"&":"?";
		
		function selectall_todo()
		{
			$("input[name='chk_list']").attr("checked",true);
		}
		function selectall_undo()
		{
			$("input[name='chk_list']").attr("checked",false);
		}
        $(document).ready(function(){
			$('#misone_list_table').datagrid({
				//url: '///',
				//title: 'DataGrid',
				//width: 800,
				//height: 220,
				fitColumns: true,
				nowrap:false,
				rownumbers:true,
				showFooter:false,
				columns:[[
					{field:'item01',title:'入库日期',width:80},
					{field:'item02',title:'仓库',width:60},
					{field:'item03',title:'商品名称',width:150}, //,align:'right'
					{field:'item04',title:'编号/条码',width:80},
					{field:'item05',title:'单位',width:50},
					{field:'item06',title:'批号',width:80},
					{field:'item07',title:'有效期',width:80,align:'center'},
					{field:'item08',title:'批准文号',width:80,align:'center'},
					{field:'item09',title:'规格',width:80},
                    {field:'item10',title:'产地',width:80},
                    {field:'item11',title:'库存数量',width:60},
                    {field:'item13',title:'单位成本',width:60},
                    {field:'item12',title:'价值',width:60},                    
                    {field:'item14',title:'销售价格',width:60}
				]]
			});
		});
	</script>
</head>
<body class="">
	<div class="demo-info space-out-5px">
		<div class="demo-tip icon-tip"></div>
		<div>库存列表（含成本）</div>
		<div>
		<form id="frm_search" method="post" action="{:U('Warehouse/stk_detail')}" style="margin:10px auto 0px 25px;">
		<div style="float:left; margin:0px; padding:2px;">
		<select id="wh_id" name="wh_id" class="easyui-combobox" editable="false" style="width:190px;">
								<option value=''>所有仓库</option>
								<volist name='whlist' id="whlist">
								<option value='{$whlist["id"]}'>{$whlist['title']}</option>
								</volist>
		</select>
		</div>
		<script type="text/javascript">$("#wh_id").attr("value","{$wh_id}");</script>
		商品编号/条码/名称：<input type="text" id="keywords" name="keywords" class="input" value="{$keywords}" />
		<a href="javascript:;" class="easyui-linkbutton" iconCls="icon-search" onclick="$('#frm_search').submit();">搜索</a>
        <a href="{:U('Warehouse/stk_detail')}" class="easyui-linkbutton" iconCls="icon-reload">刷新</a>
        <a href="javascript:;" class="easyui-linkbutton" iconCls="icon-print" style="display:;" onclick="window.open('{:U('Warehouse/stk_detail_print')}?cid={$cid}&keywords={$keywords}&wh_id={$wh_id}');">打印</a>
		</form>
		</div>
	</div>
	
	<div class=" space-out-10px">
	
	<table style="border:0px;width:100%;">
    <tr>
    <td style="width:120px;" valign="top">
    <span class="tree-hit tree-expanded tree-expanded-hover"></span><a href="{:U('Warehouse/stk_detail')}">所有类别</a>
    <volist name="stk_class_list" id="stk_class_list">
        <div class="w100px" style="height:22px;line-height:22px;overflow:hidden;" alt="{$stk_class_list.classname}" title="{$stk_class_list.classname}">
			<for start="3" end="$stk_class_list['count']">
				<span class="tree-indent"></span>
			</for><span class="tree-hit tree-expanded tree-expanded-hover"></span><a href="{:U('Warehouse/stk_detail?cid='.$stk_class_list['id'].'')}">{$stk_class_list.classname}</a>
        </div>
    </volist>
    </td>
    <td valign="top">
    
    <table id="misone_list_table"><tbody>
	<volist name="datalist" id="datalist">
	<tr>
		<td field="item01">{$datalist.fadate|date='Y-m-d',###}</td>
		<td field="item02">{$datalist.wh_title}</td>
		<td field="item03">{$datalist.stk_title}</td>
		<td field="item04">{$datalist.stk_code}</td>
		<td field="item05">{$datalist.stk_uom}</td>
		<td field="item06">{$datalist.batch_no}</td>
		<td field="item07">{$datalist.expiry_date|get_date='Y-m-d',###}</td>
		<td field="item08">{$datalist.approval_no}</td>
		<td field="item09">{$datalist.spec}</td>
        <td field="item10">{$datalist.madein}</td>
        <td field="item11">{$datalist.open_qty|get_round=###,6}</td>
        <td field="item13"><php>echo get_round((double)$datalist['open_amount']/(double)$datalist['open_qty']);</php></td>
        <td field="item12">{$datalist.open_amount|get_round=###,6}</td>
        <td field="item12">{$datalist.stk_price_sales|get_round=###,6}</td>
	</tr>
	</volist>
	</tbody></table>    
    
	
	<div class="list-title">
		<div class="list-t-l"><b>总计数量：{$stk_total.open_qty|get_round=###,6}&nbsp;&nbsp;&nbsp;&nbsp;总计价值：{$stk_total.open_amount|get_round=###,6}</b></div>
	</div>
    
    </td>
    </tr></table>
	
	</div>
	
	<div class="demo-info space-out-5px">
		<div class="demo-tip icon-tip"></div>
		<div class="pages">&nbsp;{$page}</div>
	</div>
</body>
</html>
